<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="style/top.css"/>
    <link rel="stylesheet" type="text/css" href="style/main.css"/>
	<link rel="stylesheet" type="text/css" href="style/footer.css"/>
	<title>编程之友BBS</title>
	<script type="text/javascript" src="script/jquery.js"></script>
	<script type="text/javascript">
		function AutoScroll(obj){
			$(obj).find("ul:first").animate({
			marginTop:"-20px"
			},500,function(){
			$(this).css({marginTop:"0px"}).find("li:first").appendTo(this);
			});
		}
		$(document).ready(function(){
			setInterval('AutoScroll("#anc")',3000);
		});
		/*
		$(document).ready(function($){
			$("#anc li:not(:first)").css("display","none");
			var B=$("#anc li:last");
			var C=$("#anc li:first");
			setInterval(function(){
			if(B.is(":visible")){
			C.fadeIn(1000).addClass("in");B.hide()
			}else{
			$("#anc li:visible").addClass("in");
			$("#anc li.in").next().fadeIn(1000);
			$("li.in").hide().removeClass("in")}
			},1000) //每5秒钟切换一条，你可以根据需要更改
		})*/
	</script>
</head>
<body>
	
	<%@ include file="template/head.jsp" %>
    
    <!-- 主体部分开始 -->
	<div id="wp" class="wp">
    	<div id="ct" class="wp cl">
			<div style="margin-top: 10px;">
            </div>
    		<!-- 帖子统计开始 -->
    		<div id="chart" class="bm bw0 cl">
            
            </div>
            <!-- 帖子统计结束 -->
            
            <!-- 公告开始 -->
            <div id="an" class="bm bw0">
                <dl class="cl">
                    <dt class="z xw1">公告:&nbsp;</dt>
                    <dd>
                        <div id="anc" class="xi2">
                            <ul>
                            	<c:forEach items="${sessionScope.ancList}" var="article">
                                <li>
                                    <a target="_blank" href="article.jspx?_method=show&id=${article.id}">
                                        ${article.name}
                                        <em>${article.createdate}</em>
                                    </a>
                                </li>
                                </c:forEach>
                            </ul>
                        </div>
                    </dd>
                </dl>
            </div>  
    		<!-- 公告结束 -->
    		
        	<div class="mn">
            	
            	<!-- 全部板块的开始 -->
            	<div>
            	
            		<c:forEach items="${sessionScope.blocksList }" var="fatherBlocks">
                	<!-- 一个父板块的开始 -->
                	<div class="bm bmw cl">
                    	<div class="bm_h cl sub_bg">
                        	<h2>
                            	<a href="index.jspx">${fatherBlocks.name }</a>
                            </h2>
                        </div>
                        
                        <div id="blocks_1" class="bm_c">
                        	<table class="fl_tb" cellpadding="0" cellspacing="0">
                            	<tbody>
                            	
                            		<c:forEach items="${fatherBlocks.blocksList }" var="blocks">
                                	<!-- 一个子板块的开始 -->
                                	<tr>
                                    	<td	class="fl_icn">
                                        	<a href="blocks.jspx?_method=show&id=${blocks.id }">
                                            	<img alt="${blocks.name }" src="images/forum_new.gif" />
                                            </a>
                                        </td>
                                        <td>
                                        	<h2>
                                            	<a href="blocks.jspx?_method=show&id=${blocks.id }">${blocks.name }</a>
                                        
                                            </h2>
                                            <p class="xg2">${blocks.content }</p>
                                        </td>
                                        <td class="fl_i">
                                        	<span>留白待用</span>
                                        </td>
                                        <td class="fl_by">
                                        	<div>
                                            	<a class="xi2" href="article.jspx?_method=show&id=${blocks.article.id }">${blocks.article.name }</a>
                                                <cite>
                                                	${blocks.article.createdate }
                                                    <a href="#">${blocks.article.user.username }</a>
                                                </cite>
                                            </div>
                                        </td>
                                    </tr>
                                    <!-- 一个子板块的结束 -->
                    				</c:forEach>
                                    
                                </tbody>
                            </table>
                        </div>
                       
                    </div>
                    <!-- 一个父板块的结束 -->
                    </c:forEach>
                </div>
                <!-- 全部板块的结束 --> 
                <!-- 在线统计开始 -->
                <div id="online" class="bm oll">
					<div class="bm_h sub_bg">
						<span class="o">
							
						</span>
						<h3>
						<strong>
						<a href="http://bbs.ylmf.net/home.php?mod=space&do=friend&view=online&type=member">在线会员</a>
						</strong>
						<span class="xs1">
						- 总计
						<strong></strong>
						人在线
						.
						</span>
						</h3>
					</div>
				</div>
                <!-- 在线统计结束 -->
            </div>
        </div>
    </div>
    <!-- 主体部分结束 -->
    
	<%@ include file="template/footer.jsp" %>
   
</body>
</html>
